<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="LinkedList,org.as3commons.collections.LinkedList,add,addFirst,addLast,addNodeBefore_internal,iterator,removeNode_internal" name="keywords">
<title>org.as3commons.collections.LinkedList</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'LinkedList - AS3Commons Collections 1.3.2';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">AS3Commons Collections 1.3.2</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?org/as3commons/collections/LinkedList.html&amp;org/as3commons/collections/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;LinkedList</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class LinkedList"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.as3commons.collections</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class LinkedList</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">LinkedList <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> <a href="framework/core/AbstractLinkedDuplicatesCollection.html">AbstractLinkedDuplicatesCollection</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> <a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="framework/ILinkedList.html">ILinkedList</a></td>
</tr>
</table>
<p></p>
  Linked list data structure implementation.
  
  <p><strong>Description</strong></p>
  
  <p>The <code>LinkedList</code> is a collection made up of mutually linking nodes
  where each node holds a reference to the actual item added.</p>
  
  <p><strong>Runtime of operations</strong></p>
  
  <ul>
  <li>Adding, getting or removing of items - constant runtime O(1).<br />
  <code>add(), addFirst(), addLast(), first, last, removeFirst(), removeLast()</code></li>
  <li>Item lookup operations - linear runtime O(n).<br />
  has(), count(), remove(), removeAll()</code></li>
  </ul>
  
  <p><strong>Notes</strong></p>
  
  <p>The <code>iterator()</code> method does not support (ignores) the cursor parameter.</p>
  
  <p>The <code>iterator()</code> method retuns an <code>ILinkedListIterator</code>.</p>
  
  <p><code>null</code> is allowed.</p>
  
  <p id="link_LinkedListExample"><strong>LinkedList example</strong></p>
  
  <p>This example shows the specific behaviour of a <code>LinkedList</code>.
  The general work with collections and iterators is more detailed illustrated
  in the <code>ArrayList</code> examples below.</p>
  
  <a class="exampleCollapsed" href="#link_LinkedListExample" onClick="toggleExample(this, 'LinkedListExample');">Show example</a><br /><div id="LinkedListExample" style='display:none'><div class='listing'><pre>package {
    import org.as3commons.collections.LinkedList;
    import org.as3commons.collections.framework.ICollectionIterator;
    import org.as3commons.collections.framework.IIterator;
    import org.as3commons.collections.framework.ILinkedList;
    import org.as3commons.collections.framework.ILinkedListIterator;
    import flash.display.Sprite;

    public class LinkedListExample extends Sprite {

        public function LinkedListExample() {
            var list : ILinkedList = new LinkedList();
            
            // Add
            
            list.add(4);
            list.add(1);
            list.add(3);
            list.add(5);
            list.add(2);
            trace (list.toArray()); // 4,1,3,5,2
            
            list.addFirst(6);
            list.addLast(7);
            trace (list.toArray()); // 6,4,1,3,5,2,7

            // Inspection
            
            trace (list.first); // 6
            trace (list.last); // 7
            
            // Iterator

            var iterator : IIterator = list.iterator();
            trace (iterator is IIterator); // true
            trace (iterator is ICollectionIterator); // true
            trace (iterator is ILinkedListIterator); // true
            
            while (iterator.hasNext()) {
                trace (iterator.next()); // 6,4,1,3,5,2,7
            }

            // Linked list iterator

            var lli : ILinkedListIterator = list.iterator() as ILinkedListIterator;
            trace (lli.previousItem + " [" + lli.current + "] " + lli.nextItem);
            while (lli.hasNext()) {
                lli.next();
                trace (lli.previousItem + " [" + lli.current + "] " + lli.nextItem);
            }

            // undefined [undefined] 6
            // 6 [6] 4
            // 4 [4] 1
            // 1 [1] 3
            // 3 [3] 5
            // 5 [5] 2
            // 2 [2] 7
            // 7 [7] undefined

            // Remove

            list.removeFirst();
            list.removeFirst();
            list.removeLast();
            list.removeLast();
            trace (list.toArray()); // 1,3,5
        }
    }
}
</pre></div></div>
  
  <p id="link_ArrayListExample"><strong>ArrayList example</strong></p>
  
  <a class="exampleCollapsed" href="#link_ArrayListExample" onClick="toggleExample(this, 'ArrayListExample');">Show example</a><br /><div id="ArrayListExample" style='display:none'><div class='listing'><pre>package {
    import org.as3commons.collections.ArrayList;
    import org.as3commons.collections.framework.ICollectionIterator;
    import org.as3commons.collections.framework.IIterator;
    import org.as3commons.collections.framework.IListIterator;
    import org.as3commons.collections.framework.IOrderedListIterator;
    import org.as3commons.collections.utils.StringComparator;
    import flash.display.Sprite;

    public class ArrayListExample extends Sprite {

        public function ArrayListExample() {
            var list : ArrayList = new ArrayList();
            
            // Add

            list.add("a");
            list.add("b");
            list.addAllAt(1, ["c", "d"]);
            trace (list.toArray()); // a,c,d,b

            list.addFirst("e");
            list.addLast("a");
            list.addAt(3, "a");
            trace (list.toArray()); // e,a,c,a,d,b,a
            
            // Replace

            list.replaceAt(2, "a");
            list.replaceAt(3, "f");
            trace (list.toArray()); // e,a,a,f,d,b,a

            // Inspection

            trace (list.size); // 7
            trace (list.has("b")); // true
            trace (list.itemAt(3)); // f
            trace (list.firstIndexOf("a")); // 1
            trace (list.lastIndexOf("a")); // 6
            trace (list.count("a")); // 3
            
            // Reorder

            list.reverse();
            trace (list.toArray()); // a,b,d,f,a,a,e

            list.sort(new StringComparator());
            trace (list.toArray()); // a,a,a,b,d,e,f
            
            // Iterator

            var iterator : IIterator = list.iterator();
            trace (iterator is IIterator); // true
            trace (iterator is ICollectionIterator); // true
            trace (iterator is IListIterator); // true
            trace (iterator is IOrderedListIterator); // true

            while (iterator.hasNext()) {
                trace (iterator.next()); // a,a,a,b,d,e,f
            }

            // List iterator

            var listIterator : IListIterator = list.iterator() as IListIterator;
            while (listIterator.hasNext()) {
                listIterator.next();
                trace (listIterator.index + "=" + listIterator.current);
            }

            // 0=a
            // 1=a
            // 2=a
            // 3=b
            // 4=d
            // 5=e
            // 6=f

            // Remove

            list.remove("a");
            trace (list.toArray()); // a,a,b,d,e,f

            list.removeAll("a");
            trace (list.toArray()); // b,d,e,f

            list.removeAt(1);
            list.removeFirst();
            list.removeLast();
            trace (list.toArray()); // e

            list.clear();
            trace (list.toArray()); // []
        }
    }
}
</pre></div></div>
  
  <p id="link_ArrayListIteratorExample"><strong>ArrayListIterator example</strong></p>
  
  <a class="exampleCollapsed" href="#link_ArrayListIteratorExample" onClick="toggleExample(this, 'ArrayListIteratorExample');">Show example</a><br /><div id="ArrayListIteratorExample" style='display:none'><div class='listing'><pre>package {
    import org.as3commons.collections.ArrayList;
    import org.as3commons.collections.framework.IOrderedListIterator;
    import flash.display.Sprite;

    public class ArrayListIteratorExample extends Sprite {

        public function ArrayListIteratorExample() {
            var list : ArrayList = new ArrayList();
            var iterator : IOrderedListIterator;
            var item : 
            
            // ^ = cursor, [n] = current
            
            // Navigation
            
            list.array = [1, 2, 3];
            iterator = list.iterator() as IOrderedListIterator;
            
                                      //  ^  1  2  3
            iterator.next();          // [1] ^  2  3
            iterator.next();          //  1 [2] ^  3
            iterator.next();          //  1  2 [3] ^
            iterator.next();          //  1  2  3  ^
            iterator.previous();      //  1  2  ^ [3]
            iterator.previous();      //  1  ^ [2] 3
            iterator.previous();      //  ^ [1] 2  3
            iterator.previous();      //  ^  1  2  3

            iterator.next();          // [1] ^  2  3
            iterator.next();          //  1 [2] ^  3
            iterator.start();         //  ^  1  2  3

            iterator.next();          // [1] ^  2  3
            iterator.next();          //  1 [2] ^  3
            iterator.end();           //  1  2  3  ^
            
            // Current and index

            iterator = list.iterator() as IOrderedListIterator;
            
            with (iterator) {
                trace (index, current, previousIndex, nextIndex);
                // -1 undefined -1 0

                next();
                trace (index, current, previousIndex, nextIndex);
                // 0 1 0 1

                next();
                trace (index, current, previousIndex, nextIndex);
                // 1 2 1 2

                next();
                trace (index, current, previousIndex, nextIndex);
                // 2 3 2 -1

                next();
                trace (index, current, previousIndex, nextIndex);
                // -1 undefined 2 -1
            }
            
            // Start position
            
            iterator = list.iterator() as IOrderedListIterator;   //  ^  1  2  3
            iterator = list.iterator(1) as IOrderedListIterator;  //  1  ^  2  3
            iterator = list.iterator(2) as IOrderedListIterator;  //  1  2  ^  3
            iterator = list.iterator(10) as IOrderedListIterator; //  1  2  3  ^

            // Replace

            iterator = list.iterator() as IOrderedListIterator;

                                      //  ^  1  2  3
            iterator.next();          // [1] ^  2  3
            iterator.next();          //  1 [2] ^  3
            iterator.replace(4);      //  1 [4] ^  3
            iterator.next();          //  1  4 [3] ^
            iterator.replace(5);      //  1  4 [5] ^
            iterator.next();          //  1  4  5  ^
            iterator.replace(6);      //  1  4  5  ^

            // Remove

            list.array = [1, 2, 3];
            iterator = list.iterator() as IOrderedListIterator;
            
                                      //  ^  1  2  3
            iterator.next();          // [1] ^  2  3
            iterator.next();          //  1 [2] ^  3
            iterator.remove();        //  1  ^  3
            iterator.next();          //  1 [3] ^
            iterator.remove();        //  1  ^
            iterator.remove();        //  1  ^

            // Add

            list.array = [1, 2, 3];
            iterator = list.iterator() as IOrderedListIterator;
            
                                      //  ^  1  2  3
            iterator.addAfter(4);     //  ^  4  1  2  3
            iterator.addBefore(5);    //  5  ^  4  1  2  3

            iterator.next();          //  5 [4] ^  1  2  3
            iterator.next();          //  5  4 [1] ^  2  3
            iterator.addBefore(6);    //  5  4  1  6  ^  2  3
            iterator.addAfter(7);     //  5  4  1  6  ^  7  2  3

            iterator.next();          //  5  4  1  6 [7] ^  2  3
            iterator.next();          //  5  4  1  6  7 [2] ^  3
            iterator.next();          //  5  4  1  6  7  2 [3] ^
            iterator.addBefore(8);    //  5  4  1  6  7  2  3  8  ^
            iterator.addAfter(9);     //  5  4  1  6  7  2  3  8  ^  9
            
            // Add during iteration

            list.array = [1, 2, 3];
            iterator = list.iterator() as IOrderedListIterator;
            while (iterator.hasNext()) {
                item = iterator.next();
                trace (item); // 1,2,5,3,7

                if (item == 1) iterator.addBefore(4);   //  1  4  ^  2  3
                if (item == 2) iterator.addAfter(5);    //  1  4  2  ^  5  3
                if (item == 5) iterator.addBefore(6);   //  1  4  2  5  6  ^  3
                if (item == 3) iterator.addAfter(7);    //  1  4  2  5  6  3  ^  7
            }
            trace (list.toArray()); // 1,4,2,5,6,3,7

            // Replace during iteration

            list.array = [1, 2, 3];
            iterator = list.iterator() as IOrderedListIterator;
            while (iterator.hasNext()) {
                item = iterator.next();
                trace (item); // 1,2,3

                if (item == 1) iterator.replace(4);   // [4] ^  2  3
                if (item == 2) iterator.replace(5);   //  4 [5] ^  3
                if (item == 3) iterator.replace(6);   //  4  5 [6] ^
            }
            trace (list.toArray()); // 4,5,6

            // Remove during iteration

            list.array = [1, 2, 3, 4, 5];
            iterator = list.iterator() as IOrderedListIterator;
            while (iterator.hasNext()) {
                item = iterator.next();
                trace (item); // 1,2,3,4,5

                if (item == 1) iterator.remove();   //  ^  2  3  4  5
                if (item == 3) iterator.remove();   //  2  ^  4  5
                if (item == 5) iterator.remove();   //  2  4  ^
            }
            trace (list.toArray()); // 2,4

            // Reverse iteration

            list.array = [1, 2, 3, 4, 5];
            iterator = list.iterator() as IOrderedListIterator;
            iterator.end();
            while (iterator.hasPrevious()) {
                trace (iterator.previous()); // 5,4,3,2,1
            }
        }
    }
}
</pre></div></div>
  
  <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="framework/ILinkedList.html" target="">ILinkedList interface - Detailed description of the linked list features.</a>
<br>
<a href="framework/ILinkedListIterator.html" target="">ILinkedListIterator interface - Detailed description of the linked list iterator features.</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProperty" id="hideInheritedProperty">
<a onclick="javascript:setInheritedVisible(false,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Properties</a>
</div>
<div class="showInheritedProperty" id="showInheritedProperty">
<a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Properties</a>
</div>
</div>
<table id="summaryTableProperty" class="summaryTable hideInheritedProperty" cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#first">first</a> : *<div class="summaryTableDescription">
   
   The first item or <code>undefined</code> if the collection is empty.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#last">last</a> : *<div class="summaryTableDescription">
   
   The last item or <code>undefined</code> if the collection is empty.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#size">size</a> : uint<div class="summaryTableDescription">
   
   The number of items contained by the collection.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedProperty" id="hideInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(false,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Properties</a>
</div>
<div class="showInheritedProtectedProperty" id="showInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(true,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Properties</a>
</div>
</div>
<table id="summaryTableProtectedProperty" class="summaryTable hideInheritedProtectedProperty" cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#_first">_first</a> : <a href="framework/core/LinkedNode.html">LinkedNode</a>
<div class="summaryTableDescription">
   The first node.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#_last">_last</a> : <a href="framework/core/LinkedNode.html">LinkedNode</a>
<div class="summaryTableDescription">
   The last node.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#_size">_size</a> : uint = 0<div class="summaryTableDescription">
   The size of the list.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#LinkedList()">LinkedList</a>()</div>
<div class="summaryTableDescription">
   LinkedList constructor.</div>
</td><td class="summaryTableOwnerCol">LinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#add()">add</a>(item:*):void</div>
<div class="summaryTableDescription">
   
   Adds an item at the end of the list.</div>
</td><td class="summaryTableOwnerCol">LinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addFirst()">addFirst</a>(item:*):void</div>
<div class="summaryTableDescription">
   
   Adds an item in front of the list.</div>
</td><td class="summaryTableOwnerCol">LinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addLast()">addLast</a>(item:*):void</div>
<div class="summaryTableDescription">
   
   Adds an item at the end of the list.</div>
</td><td class="summaryTableOwnerCol">LinkedList</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#clear()">clear</a>():Boolean</div>
<div class="summaryTableDescription">
   
   Removes all items from the collection.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedDuplicatesCollection.html#count()">count</a>(item:*):uint</div>
<div class="summaryTableDescription">
   
   Returns the number of occurrences of an item.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedDuplicatesCollection.html">AbstractLinkedDuplicatesCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#has()">has</a>(item:*):Boolean</div>
<div class="summaryTableDescription">
   
   Tests if an item is contained by the collection.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#iterator()">iterator</a>(cursor:*):<a href="framework/IIterator.html">IIterator</a>
</div>
<div class="summaryTableDescription">
   
   
   Returns an iterator over the iterable data structure.</div>
</td><td class="summaryTableOwnerCol">LinkedList</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#remove()">remove</a>(item:*):Boolean</div>
<div class="summaryTableDescription">
   
   Removes an item from the collection.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedDuplicatesCollection.html#removeAll()">removeAll</a>(item:*):uint</div>
<div class="summaryTableDescription">
   
   Removes all occurrences of a particular item from the collection.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedDuplicatesCollection.html">AbstractLinkedDuplicatesCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#removeFirst()">removeFirst</a>():*</div>
<div class="summaryTableDescription">
   
   Removes the first item of the ordered collection.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#removeLast()">removeLast</a>():*</div>
<div class="summaryTableDescription">
   
   Removes the last item of the ordered collection.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#reverse()">reverse</a>():Boolean</div>
<div class="summaryTableDescription">
   
   Reverses the collection order.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#sort()">sort</a>(comparator:<a href="framework/IComparator.html">IComparator</a>):Boolean</div>
<div class="summaryTableDescription">
   
   Sorts the linked collection using the given comparator.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#toArray()">toArray</a>():Array</div>
<div class="summaryTableDescription">
   
   Returns an array of all items.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedMethod" id="hideInheritedProtectedMethod">
<a onclick="javascript:setInheritedVisible(false,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Methods</a>
</div>
<div class="showInheritedProtectedMethod" id="showInheritedProtectedMethod">
<a onclick="javascript:setInheritedVisible(true,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Methods</a>
</div>
</div>
<table id="summaryTableProtectedMethod" class="summaryTable hideInheritedProtectedMethod" cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#addNodeAfter()">addNodeAfter</a>(previous:<a href="framework/core/LinkedNode.html">LinkedNode</a>, node:<a href="framework/core/LinkedNode.html">LinkedNode</a>):void</div>
<div class="summaryTableDescription">
   Inserts a new node after an existing node.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#addNodeBefore()">addNodeBefore</a>(next:<a href="framework/core/LinkedNode.html">LinkedNode</a>, node:<a href="framework/core/LinkedNode.html">LinkedNode</a>):void</div>
<div class="summaryTableDescription">
   Inserts a new node before an existing node.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#addNodeFirst()">addNodeFirst</a>(node:<a href="framework/core/LinkedNode.html">LinkedNode</a>):void</div>
<div class="summaryTableDescription">
   Inserts a new node at the begin of the list.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#addNodeLast()">addNodeLast</a>(node:<a href="framework/core/LinkedNode.html">LinkedNode</a>):void</div>
<div class="summaryTableDescription">
   Inserts a new node at the end of the list.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#firstNodeOf()">firstNodeOf</a>(item:*):<a href="framework/core/LinkedNode.html">LinkedNode</a>
</div>
<div class="summaryTableDescription">
   Retrieves the first node containing the specified item.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#mergeSort()">mergeSort</a>(comparator:<a href="framework/IComparator.html">IComparator</a>):void</div>
<div class="summaryTableDescription">
   Merge sort algorithm.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="framework/core/AbstractLinkedCollection.html#removeNode()">removeNode</a>(node:<a href="framework/core/LinkedNode.html">LinkedNode</a>):void</div>
<div class="summaryTableDescription">
   Unlinks a node and connects predecessor with successor.</div>
</td><td class="summaryTableOwnerCol"><a href="framework/core/AbstractLinkedCollection.html">AbstractLinkedCollection</a></td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="LinkedList()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">LinkedList</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function LinkedList()</code><p>
   LinkedList constructor.
   </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="add()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">add</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function add(item:*):void</code><p>
   
   Adds an item at the end of the list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to add.
   </td>
</tr>
</table>
</div>
<a name="addFirst()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addFirst</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addFirst(item:*):void</code><p>
   
   Adds an item in front of the list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to add.
   </td>
</tr>
</table>
</div>
<a name="addLast()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addLast</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addLast(item:*):void</code><p>
   
   Adds an item at the end of the list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; The item to add.
   </td>
</tr>
</table>
</div>
<a name="addNodeBefore_internal()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addNodeBefore_internal</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>as3commons_collections function addNodeBefore_internal(next:<a href="framework/core/LinkedNode.html">LinkedNode</a>, node:<a href="framework/core/LinkedNode.html">LinkedNode</a>):void</code><p>
   Framework internal method to add a node before an existing one.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">next</span>:<a href="framework/core/LinkedNode.html">LinkedNode</a></code> &mdash; The node to add before.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="framework/core/LinkedNode.html">LinkedNode</a></code> &mdash; The node to add.
   </td>
</tr>
</table>
</div>
<a name="iterator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">iterator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function iterator(cursor:*):<a href="framework/IIterator.html">IIterator</a></code><p>
   
   
   Returns an iterator over the iterable data structure.
   
   </p><p>The <code>cursor</code> parameter is optional and not considered by all iterable
   data structures. E.g. the iterator of an unordered collection such as <code>Map</code>
   or <code>Set</code> starts always with the first item found. Still passing a parameter to
   such a data structure does not throw an error and will simply show no effect.</p>
   
   <p>The type of the cursor is unspecified and depends on the particular data structure.
   E.g. lists allow to specify an index, sets to specify an item and maps to specify a key.</p>
   
   <p>If <code>cursor</code> is specified, the iterator returns the item that is related
   to that cursor with the first call to <code>next()</code> (and its predecessor with
   the first call to <code>previous()</code> if the iterator allows bidirectional
   navigation.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">cursor</span>:*</code> &mdash; The initial cursor position.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="framework/IIterator.html">IIterator</a></code> &mdash; 
                        An iterator.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="removeNode_internal()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeNode_internal</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>as3commons_collections function removeNode_internal(node:<a href="framework/core/LinkedNode.html">LinkedNode</a>):void</code><p>
   Framework internal method to remove a node from the list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">node</span>:<a href="framework/core/LinkedNode.html">LinkedNode</a></code> &mdash; The node to remove.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
